package com.mh.jdbc.exception;

import java.sql.SQLException;

public class DAOException extends SQLException{
	private static final long serialVersionUID = 1L;
	private String errCode;//异常码
	private int level=0;//异常级别
	public DAOException() {}
	public DAOException(String msg, Throwable cause, String errCode) {
		super(msg, cause);
		this.errCode = errCode;
	}
	public DAOException(String msg, String errCode) {
		super(msg);
		this.errCode = errCode;
	}
	public DAOException(String msg, Throwable cause) {
		super(msg, cause);
	}
	public DAOException(String msg) {
		super(msg);
		level=1;
	}
	public DAOException(Throwable cause) {
		super(cause);
		level=0;
	}
	public String getErrCode() {
		return errCode;
	}
	public void setErrCode(String errCode) {
		this.errCode = errCode;
	}
	public int getLevel() {
		return level;
	}
	public void setLevel(int level) {
		this.level = level;
	}
}
